YES(O(1),O(n^2)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , and(@x, @y) -> #and(@x, @y) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We add following dependency tuples: Strict DPs: { #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , #less^#(@x, @y) -> c_2(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , and^#(@x, @y) -> c_3(#and^#(@x, @y)) , insert^#(@x, @l) -> c_4(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_5(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#1^#(nil(), @x) -> c_6() , insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_9() , leq^#(@l1, @l2) -> c_7(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_13(leq#2^#(@l2, @x, @xs)) , leq#1^#(nil(), @l2) -> c_14() , isortlist^#(@l) -> c_10(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_11(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , isortlist#1^#(nil()) -> c_12() , leq#2^#(::(@y, @ys), @x, @xs) -> c_15(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) , leq#2^#(nil(), @x, @xs) -> c_16() , or^#(@x, @y) -> c_17(#or^#(@x, @y)) } Weak DPs: { #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_18(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , #eq^#(::(@x_1, @x_2), nil()) -> c_19() , #eq^#(nil(), ::(@y_1, @y_2)) -> c_20() , #eq^#(nil(), nil()) -> c_21() , #eq^#(#0(), #0()) -> c_22() , #eq^#(#0(), #neg(@y)) -> c_23() , #eq^#(#0(), #pos(@y)) -> c_24() , #eq^#(#0(), #s(@y)) -> c_25() , #eq^#(#neg(@x), #0()) -> c_26() , #eq^#(#neg(@x), #neg(@y)) -> c_27(#eq^#(@x, @y)) , #eq^#(#neg(@x), #pos(@y)) -> c_28() , #eq^#(#pos(@x), #0()) -> c_29() , #eq^#(#pos(@x), #neg(@y)) -> c_30() , #eq^#(#pos(@x), #pos(@y)) -> c_31(#eq^#(@x, @y)) , #eq^#(#s(@x), #0()) -> c_32() , #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , #cklt^#(#EQ()) -> c_46() , #cklt^#(#GT()) -> c_47() , #cklt^#(#LT()) -> c_48() , #compare^#(#0(), #0()) -> c_34() , #compare^#(#0(), #neg(@y)) -> c_35() , #compare^#(#0(), #pos(@y)) -> c_36() , #compare^#(#0(), #s(@y)) -> c_37() , #compare^#(#neg(@x), #0()) -> c_38() , #compare^#(#neg(@x), #neg(@y)) -> c_39(#compare^#(@y, @x)) , #compare^#(#neg(@x), #pos(@y)) -> c_40() , #compare^#(#pos(@x), #0()) -> c_41() , #compare^#(#pos(@x), #neg(@y)) -> c_42() , #compare^#(#pos(@x), #pos(@y)) -> c_43(#compare^#(@x, @y)) , #compare^#(#s(@x), #0()) -> c_44() , #compare^#(#s(@x), #s(@y)) -> c_45(#compare^#(@x, @y)) , #and^#(#false(), #false()) -> c_49() , #and^#(#false(), #true()) -> c_50() , #and^#(#true(), #false()) -> c_51() , #and^#(#true(), #true()) -> c_52() , #or^#(#false(), #false()) -> c_53() , #or^#(#false(), #true()) -> c_54() , #or^#(#true(), #false()) -> c_55() , #or^#(#true(), #true()) -> c_56() } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , #less^#(@x, @y) -> c_2(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , and^#(@x, @y) -> c_3(#and^#(@x, @y)) , insert^#(@x, @l) -> c_4(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_5(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#1^#(nil(), @x) -> c_6() , insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) , insert#2^#(#true(), @x, @y, @ys) -> c_9() , leq^#(@l1, @l2) -> c_7(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_13(leq#2^#(@l2, @x, @xs)) , leq#1^#(nil(), @l2) -> c_14() , isortlist^#(@l) -> c_10(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_11(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , isortlist#1^#(nil()) -> c_12() , leq#2^#(::(@y, @ys), @x, @xs) -> c_15(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) , leq#2^#(nil(), @x, @xs) -> c_16() , or^#(@x, @y) -> c_17(#or^#(@x, @y)) } Weak DPs: { #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_18(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , #eq^#(::(@x_1, @x_2), nil()) -> c_19() , #eq^#(nil(), ::(@y_1, @y_2)) -> c_20() , #eq^#(nil(), nil()) -> c_21() , #eq^#(#0(), #0()) -> c_22() , #eq^#(#0(), #neg(@y)) -> c_23() , #eq^#(#0(), #pos(@y)) -> c_24() , #eq^#(#0(), #s(@y)) -> c_25() , #eq^#(#neg(@x), #0()) -> c_26() , #eq^#(#neg(@x), #neg(@y)) -> c_27(#eq^#(@x, @y)) , #eq^#(#neg(@x), #pos(@y)) -> c_28() , #eq^#(#pos(@x), #0()) -> c_29() , #eq^#(#pos(@x), #neg(@y)) -> c_30() , #eq^#(#pos(@x), #pos(@y)) -> c_31(#eq^#(@x, @y)) , #eq^#(#s(@x), #0()) -> c_32() , #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , #cklt^#(#EQ()) -> c_46() , #cklt^#(#GT()) -> c_47() , #cklt^#(#LT()) -> c_48() , #compare^#(#0(), #0()) -> c_34() , #compare^#(#0(), #neg(@y)) -> c_35() , #compare^#(#0(), #pos(@y)) -> c_36() , #compare^#(#0(), #s(@y)) -> c_37() , #compare^#(#neg(@x), #0()) -> c_38() , #compare^#(#neg(@x), #neg(@y)) -> c_39(#compare^#(@y, @x)) , #compare^#(#neg(@x), #pos(@y)) -> c_40() , #compare^#(#pos(@x), #0()) -> c_41() , #compare^#(#pos(@x), #neg(@y)) -> c_42() , #compare^#(#pos(@x), #pos(@y)) -> c_43(#compare^#(@x, @y)) , #compare^#(#s(@x), #0()) -> c_44() , #compare^#(#s(@x), #s(@y)) -> c_45(#compare^#(@x, @y)) , #and^#(#false(), #false()) -> c_49() , #and^#(#false(), #true()) -> c_50() , #and^#(#true(), #false()) -> c_51() , #and^#(#true(), #true()) -> c_52() , #or^#(#false(), #false()) -> c_53() , #or^#(#false(), #true()) -> c_54() , #or^#(#true(), #false()) -> c_55() , #or^#(#true(), #true()) -> c_56() } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We estimate the number of application of {1,2,3,6,8,11,14,16,17} by applications of Pre({1,2,3,6,8,11,14,16,17}) = {4,5,9,10,12,15}. Here rules are labeled as follows: DPs: { 1: #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , 2: #less^#(@x, @y) -> c_2(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , 3: and^#(@x, @y) -> c_3(#and^#(@x, @y)) , 4: insert^#(@x, @l) -> c_4(insert#1^#(@l, @x)) , 5: insert#1^#(::(@y, @ys), @x) -> c_5(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , 6: insert#1^#(nil(), @x) -> c_6() , 7: insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) , 8: insert#2^#(#true(), @x, @y, @ys) -> c_9() , 9: leq^#(@l1, @l2) -> c_7(leq#1^#(@l1, @l2)) , 10: leq#1^#(::(@x, @xs), @l2) -> c_13(leq#2^#(@l2, @x, @xs)) , 11: leq#1^#(nil(), @l2) -> c_14() , 12: isortlist^#(@l) -> c_10(isortlist#1^#(@l)) , 13: isortlist#1^#(::(@x, @xs)) -> c_11(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , 14: isortlist#1^#(nil()) -> c_12() , 15: leq#2^#(::(@y, @ys), @x, @xs) -> c_15(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) , 16: leq#2^#(nil(), @x, @xs) -> c_16() , 17: or^#(@x, @y) -> c_17(#or^#(@x, @y)) , 18: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_18(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , 19: #eq^#(::(@x_1, @x_2), nil()) -> c_19() , 20: #eq^#(nil(), ::(@y_1, @y_2)) -> c_20() , 21: #eq^#(nil(), nil()) -> c_21() , 22: #eq^#(#0(), #0()) -> c_22() , 23: #eq^#(#0(), #neg(@y)) -> c_23() , 24: #eq^#(#0(), #pos(@y)) -> c_24() , 25: #eq^#(#0(), #s(@y)) -> c_25() , 26: #eq^#(#neg(@x), #0()) -> c_26() , 27: #eq^#(#neg(@x), #neg(@y)) -> c_27(#eq^#(@x, @y)) , 28: #eq^#(#neg(@x), #pos(@y)) -> c_28() , 29: #eq^#(#pos(@x), #0()) -> c_29() , 30: #eq^#(#pos(@x), #neg(@y)) -> c_30() , 31: #eq^#(#pos(@x), #pos(@y)) -> c_31(#eq^#(@x, @y)) , 32: #eq^#(#s(@x), #0()) -> c_32() , 33: #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , 34: #cklt^#(#EQ()) -> c_46() , 35: #cklt^#(#GT()) -> c_47() , 36: #cklt^#(#LT()) -> c_48() , 37: #compare^#(#0(), #0()) -> c_34() , 38: #compare^#(#0(), #neg(@y)) -> c_35() , 39: #compare^#(#0(), #pos(@y)) -> c_36() , 40: #compare^#(#0(), #s(@y)) -> c_37() , 41: #compare^#(#neg(@x), #0()) -> c_38() , 42: #compare^#(#neg(@x), #neg(@y)) -> c_39(#compare^#(@y, @x)) , 43: #compare^#(#neg(@x), #pos(@y)) -> c_40() , 44: #compare^#(#pos(@x), #0()) -> c_41() , 45: #compare^#(#pos(@x), #neg(@y)) -> c_42() , 46: #compare^#(#pos(@x), #pos(@y)) -> c_43(#compare^#(@x, @y)) , 47: #compare^#(#s(@x), #0()) -> c_44() , 48: #compare^#(#s(@x), #s(@y)) -> c_45(#compare^#(@x, @y)) , 49: #and^#(#false(), #false()) -> c_49() , 50: #and^#(#false(), #true()) -> c_50() , 51: #and^#(#true(), #false()) -> c_51() , 52: #and^#(#true(), #true()) -> c_52() , 53: #or^#(#false(), #false()) -> c_53() , 54: #or^#(#false(), #true()) -> c_54() , 55: #or^#(#true(), #false()) -> c_55() , 56: #or^#(#true(), #true()) -> c_56() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert^#(@x, @l) -> c_4(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_5(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) , leq^#(@l1, @l2) -> c_7(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_13(leq#2^#(@l2, @x, @xs)) , isortlist^#(@l) -> c_10(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_11(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , leq#2^#(::(@y, @ys), @x, @xs) -> c_15(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) } Weak DPs: { #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_18(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , #eq^#(::(@x_1, @x_2), nil()) -> c_19() , #eq^#(nil(), ::(@y_1, @y_2)) -> c_20() , #eq^#(nil(), nil()) -> c_21() , #eq^#(#0(), #0()) -> c_22() , #eq^#(#0(), #neg(@y)) -> c_23() , #eq^#(#0(), #pos(@y)) -> c_24() , #eq^#(#0(), #s(@y)) -> c_25() , #eq^#(#neg(@x), #0()) -> c_26() , #eq^#(#neg(@x), #neg(@y)) -> c_27(#eq^#(@x, @y)) , #eq^#(#neg(@x), #pos(@y)) -> c_28() , #eq^#(#pos(@x), #0()) -> c_29() , #eq^#(#pos(@x), #neg(@y)) -> c_30() , #eq^#(#pos(@x), #pos(@y)) -> c_31(#eq^#(@x, @y)) , #eq^#(#s(@x), #0()) -> c_32() , #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , #less^#(@x, @y) -> c_2(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , #cklt^#(#EQ()) -> c_46() , #cklt^#(#GT()) -> c_47() , #cklt^#(#LT()) -> c_48() , #compare^#(#0(), #0()) -> c_34() , #compare^#(#0(), #neg(@y)) -> c_35() , #compare^#(#0(), #pos(@y)) -> c_36() , #compare^#(#0(), #s(@y)) -> c_37() , #compare^#(#neg(@x), #0()) -> c_38() , #compare^#(#neg(@x), #neg(@y)) -> c_39(#compare^#(@y, @x)) , #compare^#(#neg(@x), #pos(@y)) -> c_40() , #compare^#(#pos(@x), #0()) -> c_41() , #compare^#(#pos(@x), #neg(@y)) -> c_42() , #compare^#(#pos(@x), #pos(@y)) -> c_43(#compare^#(@x, @y)) , #compare^#(#s(@x), #0()) -> c_44() , #compare^#(#s(@x), #s(@y)) -> c_45(#compare^#(@x, @y)) , and^#(@x, @y) -> c_3(#and^#(@x, @y)) , #and^#(#false(), #false()) -> c_49() , #and^#(#false(), #true()) -> c_50() , #and^#(#true(), #false()) -> c_51() , #and^#(#true(), #true()) -> c_52() , insert#1^#(nil(), @x) -> c_6() , insert#2^#(#true(), @x, @y, @ys) -> c_9() , leq#1^#(nil(), @l2) -> c_14() , isortlist#1^#(nil()) -> c_12() , leq#2^#(nil(), @x, @xs) -> c_16() , or^#(@x, @y) -> c_17(#or^#(@x, @y)) , #or^#(#false(), #false()) -> c_53() , #or^#(#false(), #true()) -> c_54() , #or^#(#true(), #false()) -> c_55() , #or^#(#true(), #true()) -> c_56() } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_18(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , #eq^#(::(@x_1, @x_2), nil()) -> c_19() , #eq^#(nil(), ::(@y_1, @y_2)) -> c_20() , #eq^#(nil(), nil()) -> c_21() , #eq^#(#0(), #0()) -> c_22() , #eq^#(#0(), #neg(@y)) -> c_23() , #eq^#(#0(), #pos(@y)) -> c_24() , #eq^#(#0(), #s(@y)) -> c_25() , #eq^#(#neg(@x), #0()) -> c_26() , #eq^#(#neg(@x), #neg(@y)) -> c_27(#eq^#(@x, @y)) , #eq^#(#neg(@x), #pos(@y)) -> c_28() , #eq^#(#pos(@x), #0()) -> c_29() , #eq^#(#pos(@x), #neg(@y)) -> c_30() , #eq^#(#pos(@x), #pos(@y)) -> c_31(#eq^#(@x, @y)) , #eq^#(#s(@x), #0()) -> c_32() , #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , #less^#(@x, @y) -> c_2(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , #cklt^#(#EQ()) -> c_46() , #cklt^#(#GT()) -> c_47() , #cklt^#(#LT()) -> c_48() , #compare^#(#0(), #0()) -> c_34() , #compare^#(#0(), #neg(@y)) -> c_35() , #compare^#(#0(), #pos(@y)) -> c_36() , #compare^#(#0(), #s(@y)) -> c_37() , #compare^#(#neg(@x), #0()) -> c_38() , #compare^#(#neg(@x), #neg(@y)) -> c_39(#compare^#(@y, @x)) , #compare^#(#neg(@x), #pos(@y)) -> c_40() , #compare^#(#pos(@x), #0()) -> c_41() , #compare^#(#pos(@x), #neg(@y)) -> c_42() , #compare^#(#pos(@x), #pos(@y)) -> c_43(#compare^#(@x, @y)) , #compare^#(#s(@x), #0()) -> c_44() , #compare^#(#s(@x), #s(@y)) -> c_45(#compare^#(@x, @y)) , and^#(@x, @y) -> c_3(#and^#(@x, @y)) , #and^#(#false(), #false()) -> c_49() , #and^#(#false(), #true()) -> c_50() , #and^#(#true(), #false()) -> c_51() , #and^#(#true(), #true()) -> c_52() , insert#1^#(nil(), @x) -> c_6() , insert#2^#(#true(), @x, @y, @ys) -> c_9() , leq#1^#(nil(), @l2) -> c_14() , isortlist#1^#(nil()) -> c_12() , leq#2^#(nil(), @x, @xs) -> c_16() , or^#(@x, @y) -> c_17(#or^#(@x, @y)) , #or^#(#false(), #false()) -> c_53() , #or^#(#false(), #true()) -> c_54() , #or^#(#true(), #false()) -> c_55() , #or^#(#true(), #true()) -> c_56() } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert^#(@x, @l) -> c_4(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_5(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) , leq^#(@l1, @l2) -> c_7(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_13(leq#2^#(@l2, @x, @xs)) , isortlist^#(@l) -> c_10(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_11(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , leq#2^#(::(@y, @ys), @x, @xs) -> c_15(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { leq#2^#(::(@y, @ys), @x, @xs) -> c_15(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , leq^#(@l1, @l2) -> c_4(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , isortlist^#(@l) -> c_6(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_7(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , leq#2^#(::(@y, @ys), @x, @xs) -> c_8(leq^#(@xs, @ys)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We decompose the input problem according to the dependency graph into the upper component { isortlist^#(@l) -> c_6(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_7(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) } and lower component { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , leq^#(@l1, @l2) -> c_4(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , leq#2^#(::(@y, @ys), @x, @xs) -> c_8(leq^#(@xs, @ys)) } Further, following extension rules are added to the lower component. { isortlist^#(@l) -> isortlist#1^#(@l) , isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) , isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) } TcT solves the upper component with certificate YES(O(1),O(n^1)). Sub-proof: ---------- We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { isortlist^#(@l) -> c_6(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_7(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { isortlist#1^#(::(@x, @xs)) -> c_7(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { isortlist^#(@l) -> c_1(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_2(isortlist^#(@xs)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { isortlist^#(@l) -> c_1(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_2(isortlist^#(@xs)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: isortlist^#(@l) -> c_1(isortlist#1^#(@l)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#equal](x1, x2) = [0] [#eq](x1, x2) = [0] [#less](x1, x2) = [0] [#compare](x1, x2) = [0] [#cklt](x1) = [0] [and](x1, x2) = [0] [#and](x1, x2) = [0] [insert](x1, x2) = [0] [insert#1](x1, x2) = [0] [::](x1, x2) = [1] x2 + [1] [leq](x1, x2) = [0] [insert#2](x1, x2, x3, x4) = [0] [nil] = [0] [#false] = [0] [#true] = [0] [isortlist](x1) = [0] [isortlist#1](x1) = [0] [leq#1](x1, x2) = [0] [leq#2](x1, x2, x3) = [0] [or](x1, x2) = [0] [#or](x1, x2) = [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [0] [#pos](x1) = [0] [#s](x1) = [0] [#equal^#](x1, x2) = [0] [#eq^#](x1, x2) = [0] [#less^#](x1, x2) = [0] [#cklt^#](x1) = [0] [#compare^#](x1, x2) = [0] [and^#](x1, x2) = [0] [#and^#](x1, x2) = [0] [insert^#](x1, x2) = [0] [insert#1^#](x1, x2) = [0] [insert#2^#](x1, x2, x3, x4) = [0] [leq^#](x1, x2) = [0] [leq#1^#](x1, x2) = [0] [isortlist^#](x1) = [1] x1 + [1] [isortlist#1^#](x1) = [1] x1 + [0] [leq#2^#](x1, x2, x3) = [0] [or^#](x1, x2) = [0] [#or^#](x1, x2) = [0] [c_6](x1) = [0] [c_7](x1, x2) = [0] [c] = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1) = [1] x1 + [0] This order satisfies following ordering constraints [isortlist^#(@l)] = [1] @l + [1] > [1] @l + [0] = [c_1(isortlist#1^#(@l))] [isortlist#1^#(::(@x, @xs))] = [1] @xs + [1] >= [1] @xs + [1] = [c_2(isortlist^#(@xs))] Consider the set of all dependency pairs DPs: { 1: isortlist^#(@l) -> c_1(isortlist#1^#(@l)) , 2: isortlist#1^#(::(@x, @xs)) -> c_2(isortlist^#(@xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1}. These cover all (indirect) predecessors of dependency pairs {1,2}, their number of application is equally bounded. The dependency pairs are shifted into the corresponding weak component(s). We apply the transformation 'removetails' on the sub-problem: Weak DPs: { isortlist^#(@l) -> c_1(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_2(isortlist^#(@xs)) } StartTerms: basic terms Strategy: innermost The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { isortlist^#(@l) -> c_1(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_2(isortlist^#(@xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , leq^#(@l1, @l2) -> c_4(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , leq#2^#(::(@y, @ys), @x, @xs) -> c_8(leq^#(@xs, @ys)) } Weak DPs: { isortlist^#(@l) -> isortlist#1^#(@l) , isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) , isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 6: leq#2^#(::(@y, @ys), @x, @xs) -> c_8(leq^#(@xs, @ys)) , 9: isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) } Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1, 2}, Uargs(c_3) = {1}, Uargs(c_4) = {1}, Uargs(c_5) = {1}, Uargs(c_8) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#equal](x1, x2) = [1] [#eq](x1, x2) = [0] [#less](x1, x2) = [1] [#compare](x1, x2) = [1] x1 + [0] [#cklt](x1) = [1] [and](x1, x2) = [1] x2 + [1] [#and](x1, x2) = [0] [insert](x1, x2) = [1] x1 + [1] x2 + [1] [insert#1](x1, x2) = [1] x1 + [1] x2 + [1] [::](x1, x2) = [1] x1 + [1] x2 + [1] [leq](x1, x2) = [1] [insert#2](x1, x2, x3, x4) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] [nil] = [0] [#false] = [1] [#true] = [1] [isortlist](x1) = [1] x1 + [0] [isortlist#1](x1) = [1] x1 + [0] [leq#1](x1, x2) = [1] [leq#2](x1, x2, x3) = [1] [or](x1, x2) = [1] x1 + [0] [#or](x1, x2) = [1] x1 + [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] [#equal^#](x1, x2) = [0] [#eq^#](x1, x2) = [0] [#less^#](x1, x2) = [0] [#cklt^#](x1) = [0] [#compare^#](x1, x2) = [0] [and^#](x1, x2) = [0] [#and^#](x1, x2) = [0] [insert^#](x1, x2) = [1] x2 + [1] [insert#1^#](x1, x2) = [1] x1 + [1] [insert#2^#](x1, x2, x3, x4) = [1] x4 + [1] [leq^#](x1, x2) = [1] x2 + [0] [leq#1^#](x1, x2) = [1] x2 + [0] [isortlist^#](x1) = [1] x1 + [0] [isortlist#1^#](x1) = [1] x1 + [0] [leq#2^#](x1, x2, x3) = [1] x1 + [0] [or^#](x1, x2) = [0] [#or^#](x1, x2) = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1, x2) = [1] x1 + [1] x2 + [1] [c_3](x1) = [1] x1 + [0] [c_4](x1) = [1] x1 + [0] [c_5](x1) = [1] x1 + [0] [c_8](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [1] >= [1] = [#cklt(#compare(@x, @y))] [#cklt(#EQ())] = [1] >= [1] = [#false()] [#cklt(#GT())] = [1] >= [1] = [#false()] [#cklt(#LT())] = [1] >= [1] = [#true()] [insert(@x, @l)] = [1] @l + [1] @x + [1] >= [1] @l + [1] @x + [1] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @x + [1] @y + [1] @ys + [2] >= [1] @x + [1] @y + [1] @ys + [2] = [insert#2(leq(@x, @y), @x, @y, @ys)] [insert#1(nil(), @x)] = [1] @x + [1] >= [1] @x + [1] = [::(@x, nil())] [leq(@l1, @l2)] = [1] >= [1] = [leq#1(@l1, @l2)] [insert#2(#false(), @x, @y, @ys)] = [1] @x + [1] @y + [1] @ys + [2] >= [1] @x + [1] @y + [1] @ys + [2] = [::(@y, insert(@x, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @x + [1] @y + [1] @ys + [2] >= [1] @x + [1] @y + [1] @ys + [2] = [::(@x, ::(@y, @ys))] [isortlist(@l)] = [1] @l + [0] >= [1] @l + [0] = [isortlist#1(@l)] [isortlist#1(::(@x, @xs))] = [1] @x + [1] @xs + [1] >= [1] @x + [1] @xs + [1] = [insert(@x, isortlist(@xs))] [isortlist#1(nil())] = [0] >= [0] = [nil()] [leq#1(::(@x, @xs), @l2)] = [1] >= [1] = [leq#2(@l2, @x, @xs)] [leq#1(nil(), @l2)] = [1] >= [1] = [#true()] [leq#2(::(@y, @ys), @x, @xs)] = [1] >= [1] = [or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys)))] [leq#2(nil(), @x, @xs)] = [1] >= [1] = [#false()] [or(@x, @y)] = [1] @x + [0] >= [1] @x + [0] = [#or(@x, @y)] [#or(#false(), #false())] = [1] >= [1] = [#false()] [#or(#false(), #true())] = [1] >= [1] = [#true()] [#or(#true(), #false())] = [1] >= [1] = [#true()] [#or(#true(), #true())] = [1] >= [1] = [#true()] [insert^#(@x, @l)] = [1] @l + [1] >= [1] @l + [1] = [c_1(insert#1^#(@l, @x))] [insert#1^#(::(@y, @ys), @x)] = [1] @y + [1] @ys + [2] >= [1] @y + [1] @ys + [2] = [c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y))] [insert#2^#(#false(), @x, @y, @ys)] = [1] @ys + [1] >= [1] @ys + [1] = [c_3(insert^#(@x, @ys))] [leq^#(@l1, @l2)] = [1] @l2 + [0] >= [1] @l2 + [0] = [c_4(leq#1^#(@l1, @l2))] [leq#1^#(::(@x, @xs), @l2)] = [1] @l2 + [0] >= [1] @l2 + [0] = [c_5(leq#2^#(@l2, @x, @xs))] [isortlist^#(@l)] = [1] @l + [0] >= [1] @l + [0] = [isortlist#1^#(@l)] [isortlist#1^#(::(@x, @xs))] = [1] @x + [1] @xs + [1] >= [1] @xs + [1] = [insert^#(@x, isortlist(@xs))] [isortlist#1^#(::(@x, @xs))] = [1] @x + [1] @xs + [1] > [1] @xs + [0] = [isortlist^#(@xs)] [leq#2^#(::(@y, @ys), @x, @xs)] = [1] @y + [1] @ys + [1] > [1] @ys + [0] = [c_8(leq^#(@xs, @ys))] Consider the set of all dependency pairs DPs: { 1: insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , 2: insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , 3: insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , 4: leq^#(@l1, @l2) -> c_4(leq#1^#(@l1, @l2)) , 5: leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , 6: leq#2^#(::(@y, @ys), @x, @xs) -> c_8(leq^#(@xs, @ys)) , 7: isortlist^#(@l) -> isortlist#1^#(@l) , 8: isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) , 9: isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {6,9}. These cover all (indirect) predecessors of dependency pairs {6,7,8,9}, their number of application is equally bounded. The dependency pairs are shifted into the corresponding weak component(s). We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , leq^#(@l1, @l2) -> c_4(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) } Weak DPs: { isortlist^#(@l) -> isortlist#1^#(@l) , isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) , isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) , leq#2^#(::(@y, @ys), @x, @xs) -> c_8(leq^#(@xs, @ys)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 4: leq^#(@l1, @l2) -> c_4(leq#1^#(@l1, @l2)) , 8: isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) } Trs: { #equal(@x, @y) -> #eq(@x, @y) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#s(@x), #0()) -> #GT() } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1, 2}, Uargs(c_3) = {1}, Uargs(c_4) = {1}, Uargs(c_5) = {1}, Uargs(c_8) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#equal](x1, x2) = [1] [#eq](x1, x2) = [0] [#less](x1, x2) = [0] [#compare](x1, x2) = [1] [#cklt](x1) = [1] [and](x1, x2) = [0] [#and](x1, x2) = [1] [insert](x1, x2) = [1] x1 + [1] x2 + [1] [insert#1](x1, x2) = [1] x1 + [1] x2 + [1] [::](x1, x2) = [1] x1 + [1] x2 + [1] [leq](x1, x2) = [1] [insert#2](x1, x2, x3, x4) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] [nil] = [0] [#false] = [1] [#true] = [1] [isortlist](x1) = [1] x1 + [0] [isortlist#1](x1) = [1] x1 + [0] [leq#1](x1, x2) = [1] [leq#2](x1, x2, x3) = [1] [or](x1, x2) = [1] [#or](x1, x2) = [1] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] [#equal^#](x1, x2) = [0] [#eq^#](x1, x2) = [0] [#less^#](x1, x2) = [0] [#cklt^#](x1) = [0] [#compare^#](x1, x2) = [0] [and^#](x1, x2) = [0] [#and^#](x1, x2) = [0] [insert^#](x1, x2) = [1] x2 + [1] [insert#1^#](x1, x2) = [1] x1 + [1] [insert#2^#](x1, x2, x3, x4) = [1] x1 + [1] x4 + [0] [leq^#](x1, x2) = [1] x2 + [1] [leq#1^#](x1, x2) = [1] x2 + [0] [isortlist^#](x1) = [1] x1 + [0] [isortlist#1^#](x1) = [1] x1 + [0] [leq#2^#](x1, x2, x3) = [1] x1 + [0] [or^#](x1, x2) = [0] [#or^#](x1, x2) = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1, x2) = [1] x1 + [1] x2 + [0] [c_3](x1) = [1] x1 + [0] [c_4](x1) = [1] x1 + [0] [c_5](x1) = [1] x1 + [0] [c_8](x1) = [1] x1 + [0] This order satisfies following ordering constraints [insert(@x, @l)] = [1] @l + [1] @x + [1] >= [1] @l + [1] @x + [1] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @x + [1] @y + [1] @ys + [2] >= [1] @x + [1] @y + [1] @ys + [2] = [insert#2(leq(@x, @y), @x, @y, @ys)] [insert#1(nil(), @x)] = [1] @x + [1] >= [1] @x + [1] = [::(@x, nil())] [leq(@l1, @l2)] = [1] >= [1] = [leq#1(@l1, @l2)] [insert#2(#false(), @x, @y, @ys)] = [1] @x + [1] @y + [1] @ys + [2] >= [1] @x + [1] @y + [1] @ys + [2] = [::(@y, insert(@x, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @x + [1] @y + [1] @ys + [2] >= [1] @x + [1] @y + [1] @ys + [2] = [::(@x, ::(@y, @ys))] [isortlist(@l)] = [1] @l + [0] >= [1] @l + [0] = [isortlist#1(@l)] [isortlist#1(::(@x, @xs))] = [1] @x + [1] @xs + [1] >= [1] @x + [1] @xs + [1] = [insert(@x, isortlist(@xs))] [isortlist#1(nil())] = [0] >= [0] = [nil()] [leq#1(::(@x, @xs), @l2)] = [1] >= [1] = [leq#2(@l2, @x, @xs)] [leq#1(nil(), @l2)] = [1] >= [1] = [#true()] [leq#2(::(@y, @ys), @x, @xs)] = [1] >= [1] = [or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys)))] [leq#2(nil(), @x, @xs)] = [1] >= [1] = [#false()] [or(@x, @y)] = [1] >= [1] = [#or(@x, @y)] [#or(#false(), #false())] = [1] >= [1] = [#false()] [#or(#false(), #true())] = [1] >= [1] = [#true()] [#or(#true(), #false())] = [1] >= [1] = [#true()] [#or(#true(), #true())] = [1] >= [1] = [#true()] [insert^#(@x, @l)] = [1] @l + [1] >= [1] @l + [1] = [c_1(insert#1^#(@l, @x))] [insert#1^#(::(@y, @ys), @x)] = [1] @y + [1] @ys + [2] >= [1] @y + [1] @ys + [2] = [c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y))] [insert#2^#(#false(), @x, @y, @ys)] = [1] @ys + [1] >= [1] @ys + [1] = [c_3(insert^#(@x, @ys))] [leq^#(@l1, @l2)] = [1] @l2 + [1] > [1] @l2 + [0] = [c_4(leq#1^#(@l1, @l2))] [leq#1^#(::(@x, @xs), @l2)] = [1] @l2 + [0] >= [1] @l2 + [0] = [c_5(leq#2^#(@l2, @x, @xs))] [isortlist^#(@l)] = [1] @l + [0] >= [1] @l + [0] = [isortlist#1^#(@l)] [isortlist#1^#(::(@x, @xs))] = [1] @x + [1] @xs + [1] >= [1] @xs + [1] = [insert^#(@x, isortlist(@xs))] [isortlist#1^#(::(@x, @xs))] = [1] @x + [1] @xs + [1] > [1] @xs + [0] = [isortlist^#(@xs)] [leq#2^#(::(@y, @ys), @x, @xs)] = [1] @y + [1] @ys + [1] >= [1] @ys + [1] = [c_8(leq^#(@xs, @ys))] Consider the set of all dependency pairs DPs: { 1: insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , 2: insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , 3: insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , 4: leq^#(@l1, @l2) -> c_4(leq#1^#(@l1, @l2)) , 5: leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , 6: isortlist^#(@l) -> isortlist#1^#(@l) , 7: isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) , 8: isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) , 9: leq#2^#(::(@y, @ys), @x, @xs) -> c_8(leq^#(@xs, @ys)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {4,8}. These cover all (indirect) predecessors of dependency pairs {4,5,6,7,8,9}, their number of application is equally bounded. The dependency pairs are shifted into the corresponding weak component(s). We apply the transformation 'removetails' on the sub-problem: Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) } Weak DPs: { leq^#(@l1, @l2) -> c_4(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , isortlist^#(@l) -> isortlist#1^#(@l) , isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) , isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) , leq#2^#(::(@y, @ys), @x, @xs) -> c_8(leq^#(@xs, @ys)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } StartTerms: basic terms Strategy: innermost The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { leq^#(@l1, @l2) -> c_4(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , leq#2^#(::(@y, @ys), @x, @xs) -> c_8(leq^#(@xs, @ys)) } We apply the transformation 'simpDPRHS' on the sub-problem: Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) } Weak DPs: { isortlist^#(@l) -> isortlist#1^#(@l) , isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) , isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } StartTerms: basic terms Strategy: innermost Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys)) , insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) } Weak DPs: { isortlist^#(@l) -> c_4(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_5(insert^#(@x, isortlist(@xs))) , isortlist#1^#(::(@x, @xs)) -> c_6(isortlist^#(@xs)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 2: insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys)) , 6: isortlist#1^#(::(@x, @xs)) -> c_6(isortlist^#(@xs)) } Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , and(@x, @y) -> #and(@x, @y) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1}, Uargs(c_3) = {1}, Uargs(c_4) = {1}, Uargs(c_5) = {1}, Uargs(c_6) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#equal](x1, x2) = [1] [#eq](x1, x2) = [1] [#less](x1, x2) = [0] [#compare](x1, x2) = [1] x1 + [1] x2 + [1] [#cklt](x1) = [1] x1 + [1] [and](x1, x2) = [1] x1 + [1] [#and](x1, x2) = [0] [insert](x1, x2) = [1] x1 + [1] x2 + [1] [insert#1](x1, x2) = [1] x1 + [1] x2 + [1] [::](x1, x2) = [1] x1 + [1] x2 + [1] [leq](x1, x2) = [1] [insert#2](x1, x2, x3, x4) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] [nil] = [0] [#false] = [1] [#true] = [1] [isortlist](x1) = [1] x1 + [0] [isortlist#1](x1) = [1] x1 + [0] [leq#1](x1, x2) = [1] [leq#2](x1, x2, x3) = [1] [or](x1, x2) = [1] [#or](x1, x2) = [1] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [1] [#neg](x1) = [1] x1 + [1] [#pos](x1) = [1] x1 + [1] [#s](x1) = [1] x1 + [0] [#equal^#](x1, x2) = [0] [#eq^#](x1, x2) = [0] [#less^#](x1, x2) = [0] [#cklt^#](x1) = [0] [#compare^#](x1, x2) = [0] [and^#](x1, x2) = [0] [#and^#](x1, x2) = [0] [insert^#](x1, x2) = [1] x2 + [1] [insert#1^#](x1, x2) = [1] x1 + [1] [insert#2^#](x1, x2, x3, x4) = [1] x4 + [1] [leq^#](x1, x2) = [0] [leq#1^#](x1, x2) = [0] [isortlist^#](x1) = [1] x1 + [0] [isortlist#1^#](x1) = [1] x1 + [0] [leq#2^#](x1, x2, x3) = [0] [or^#](x1, x2) = [0] [#or^#](x1, x2) = [0] [c_1](x1) = [0] [c_2](x1, x2) = [0] [c_3](x1) = [0] [c_4](x1) = [0] [c_5](x1) = [0] [c_8](x1) = [0] [c] = [0] [c_1](x1) = [1] x1 + [0] [c_2](x1) = [1] x1 + [0] [c_3](x1) = [1] x1 + [0] [c_4](x1) = [1] x1 + [0] [c_5](x1) = [1] x1 + [0] [c_6](x1) = [1] x1 + [0] This order satisfies following ordering constraints [insert(@x, @l)] = [1] @l + [1] @x + [1] >= [1] @l + [1] @x + [1] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @x + [1] @y + [1] @ys + [2] >= [1] @x + [1] @y + [1] @ys + [2] = [insert#2(leq(@x, @y), @x, @y, @ys)] [insert#1(nil(), @x)] = [1] @x + [1] >= [1] @x + [1] = [::(@x, nil())] [leq(@l1, @l2)] = [1] >= [1] = [leq#1(@l1, @l2)] [insert#2(#false(), @x, @y, @ys)] = [1] @x + [1] @y + [1] @ys + [2] >= [1] @x + [1] @y + [1] @ys + [2] = [::(@y, insert(@x, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @x + [1] @y + [1] @ys + [2] >= [1] @x + [1] @y + [1] @ys + [2] = [::(@x, ::(@y, @ys))] [isortlist(@l)] = [1] @l + [0] >= [1] @l + [0] = [isortlist#1(@l)] [isortlist#1(::(@x, @xs))] = [1] @x + [1] @xs + [1] >= [1] @x + [1] @xs + [1] = [insert(@x, isortlist(@xs))] [isortlist#1(nil())] = [0] >= [0] = [nil()] [leq#1(::(@x, @xs), @l2)] = [1] >= [1] = [leq#2(@l2, @x, @xs)] [leq#1(nil(), @l2)] = [1] >= [1] = [#true()] [leq#2(::(@y, @ys), @x, @xs)] = [1] >= [1] = [or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys)))] [leq#2(nil(), @x, @xs)] = [1] >= [1] = [#false()] [or(@x, @y)] = [1] >= [1] = [#or(@x, @y)] [#or(#false(), #false())] = [1] >= [1] = [#false()] [#or(#false(), #true())] = [1] >= [1] = [#true()] [#or(#true(), #false())] = [1] >= [1] = [#true()] [#or(#true(), #true())] = [1] >= [1] = [#true()] [insert^#(@x, @l)] = [1] @l + [1] >= [1] @l + [1] = [c_1(insert#1^#(@l, @x))] [insert#1^#(::(@y, @ys), @x)] = [1] @y + [1] @ys + [2] > [1] @ys + [1] = [c_2(insert#2^#(leq(@x, @y), @x, @y, @ys))] [insert#2^#(#false(), @x, @y, @ys)] = [1] @ys + [1] >= [1] @ys + [1] = [c_3(insert^#(@x, @ys))] [isortlist^#(@l)] = [1] @l + [0] >= [1] @l + [0] = [c_4(isortlist#1^#(@l))] [isortlist#1^#(::(@x, @xs))] = [1] @x + [1] @xs + [1] >= [1] @xs + [1] = [c_5(insert^#(@x, isortlist(@xs)))] [isortlist#1^#(::(@x, @xs))] = [1] @x + [1] @xs + [1] > [1] @xs + [0] = [c_6(isortlist^#(@xs))] Consider the set of all dependency pairs DPs: { 1: insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , 2: insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys)) , 3: insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , 4: isortlist^#(@l) -> c_4(isortlist#1^#(@l)) , 5: isortlist#1^#(::(@x, @xs)) -> c_5(insert^#(@x, isortlist(@xs))) , 6: isortlist#1^#(::(@x, @xs)) -> c_6(isortlist^#(@xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {2,6}. These cover all (indirect) predecessors of dependency pairs {1,2,3,4,5,6}, their number of application is equally bounded. The dependency pairs are shifted into the corresponding weak component(s). We apply the transformation 'removetails' on the sub-problem: Weak DPs: { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys)) , insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , isortlist^#(@l) -> c_4(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_5(insert^#(@x, isortlist(@xs))) , isortlist#1^#(::(@x, @xs)) -> c_6(isortlist^#(@xs)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } StartTerms: basic terms Strategy: innermost The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { insert^#(@x, @l) -> c_1(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_2(insert#2^#(leq(@x, @y), @x, @y, @ys)) , insert#2^#(#false(), @x, @y, @ys) -> c_3(insert^#(@x, @ys)) , isortlist^#(@l) -> c_4(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_5(insert^#(@x, isortlist(@xs))) , isortlist#1^#(::(@x, @xs)) -> c_6(isortlist^#(@xs)) } We apply the transformation 'usablerules' on the sub-problem: Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #less(@x, @y) -> #cklt(#compare(@x, @y)) , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , leq(@l1, @l2) -> leq#1(@l1, @l2) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , isortlist(@l) -> isortlist#1(@l) , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , isortlist#1(nil()) -> nil() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , leq#1(nil(), @l2) -> #true() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , leq#2(nil(), @x, @xs) -> #false() , or(@x, @y) -> #or(@x, @y) , #or(#false(), #false()) -> #false() , #or(#false(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#true(), #true()) -> #true() } StartTerms: basic terms Strategy: innermost No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Wall-time: 7.1611e-2s CPU-time: 0.532s Wall-time: 22.572283s CPU-time: 168.659s Hurray, we answered YES(O(1),O(n^2))